package com.resourcestore.dao;

import java.util.List;

import com.resourcestore.dao.BaseDao;
import com.resourcestore.model.Students;
import com.resourcestore.utils.tag.Pagination;

public class StudentsDao extends BaseDao {

	public List<Students> selectStudents(){
		List<Students> list=this.queryForList("selectStudents");
		return list;
	}
	
	public Students loginStu(Students students){
		return (Students)this.queryForObject("loginStu", students);
	}
	
	public Students selectStudentsByStuNum(Students students){
		return (Students)this.queryForObject("selectStudentsByStuNum", students);
	}
	
	public List<Students> selectStudentsPage(Students students,Pagination pagination){
		List<Students> list = this.queryForPage("selectStudentsPage", students,pagination);
		return list;
	}
	
	public int queryStudentsNum(Students students) {
		return this.queryNum("selectStudentsCount", students);
	}
	
	public Students selectStudentsById(Students students){
		return (Students)this.queryForObject("selectStudentsById", students);
	}
	
	public void insertStudents(Students students){
		this.insert("insertStudents", students);		
	}
	
	public void updateStudents(Students students){
		this.update("updateStudents", students);	
	}
	
	public void deleteStudents(Students students){
		this.delete("deleteStudents", students);
	}
	
	public void deleteMoreStudents(Students majorGroup){
		this.delete("deleteMoreStudents", majorGroup);
	}
}
